﻿namespace ap2.Phone.Core.Interactivity
{
    using System;
    using Microsoft.Phone.Controls;

    public class DoubleTapTrigger : GestureTrigger
    {
        protected override void Listen(GestureListener listener)
        {
            listener.DoubleTap += new EventHandler<GestureEventArgs>(listener_DoubleTap);
        }

        protected override void EndListen(GestureListener listener)
        {
            listener.DoubleTap -= new EventHandler<GestureEventArgs>(listener_DoubleTap);
        }

        void listener_DoubleTap(object sender, GestureEventArgs e)
        {
            Invoke(e);
        }
    }
}
